package com.acme;

public class BankApplication {

	private static void modifyBank(double amount, Bank bank, int clientCount) {
		Client[] client = bank.getClients();
		for (int i = 0; i < clientCount; i++) {
			Account addmoney = client[i].getAccount();
			addmoney.deposit(amount);
		}

	}

	private static void printBalance(Bank bank, int clientCount) {
		Client[] client = bank.getClients();
		for (int i = 0; i < clientCount; i++) {
			final String Client = "Client ";
			final String balance = " balance: ";
			Account addmoney = client[i].getAccount();
			System.out.print(Client+i+balance);
			addmoney.getBalance();
		}
	}
	public static void main(String[] args) {

		int clientCount = 5;
		Bank bank = new Bank();

		for (int j = 0; j < clientCount; j++) {
			bank.clients[j] = new Client(new SavingAccount(100.5+j));
		}

		modifyBank(50.3, bank, clientCount);
		printBalance(bank, clientCount);
		

	}

}
